<template>
  <div>
    <p>测试页面</p>
    <p>请输入用户名: <input type="text" v-model="username"></p>
    <p>请输入密  码: <input type="text" v-model="password"></p>
    <button @click="getValue">登录</button>
    <p>返回结果： {{value}}</p>
    {{username}}
  </div>
  
</template>

<script>
export default {
  name: "test",
  data() {
    return {
      username: "",
      password: "",
      value: ""
    };
  },
  methods:{
    getValue(){
      this.$axios.get("/test/",   {params:{username:this.username, password: this.password}})
      .then(res => {
        console.log(res);
        this.value = res;
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>

